package com.cyb.beta.handler;

import com.jfinal.handler.Handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by Administrator on 2015/6/18.
 */
public class SessionHandler extends Handler {

    @Override
    public void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled) {
        int index = target.indexOf(";jsessionid".toUpperCase());

        if (index != -1) {
            target = target.substring(0, index);
        }
        nextHandler.handle(target, request, response, isHandled);
    }
}
